03. What You'll Build
What You'll Build Heading
What You'll Build
In the project at the end of this course, you'll have the opportunity to demonstrate your new Java skills by building a Hotel Reservation Application. Let's talk about what this project will look like, so you know where we are headed and what you'll be able to create once you finish this course.
Note that you do not need to understand everything described on this page at this time. We will cover all of these concepts as we go through the course. For now, the goal is just to get a rough idea of where we are headed.
ND079 C1 L0 A03a What Youll Build
Main Components of the App
Now let's have a look at the main components of the app. Again, some of the details we discuss here will not make much sense until you've gone through the course, so don't worry about capturing all of those specifics—we just want to give you the general idea of what you'll be building.
ND079 C1 L0 A03b What Youll Build Copy
What You'll Build Summary
The major components of the Hotel Reservation Application will consist of the following:
- CLI for the User Interface. We'll use the Command Line Interface (or CLI for the user interface. For this, we'll need to have Java monitor the CLI for user input, so the user can enter commands to search for available rooms, book rooms, and so on.
- Java code. The second main component is the Java code itself—this is where we add our business logic for the app.
- Java collections. Finally, we'll use Java collections for in-memory storage of the data we need for the app, such as the users' names, room availability, and so on.
Application Architecture
Let's talk about the structure or architecture of the application. The app will be separated into the following layers:
- User interface (UI), including a main menu for the users who want to book a room, and an admin menu for administrative functions.
- Resources will act as our Application Programming Interface (API) to our UI.
- Services will communicate with our resources, and each other, to build the business logic necessary to provide feedback to our UI.
- Data models will be used to represent the domain that we're using within the system (e.g., rooms, reservations, and customers).
Layers
An important thing to notice about this architecture is how we use layers to support modularization and decoupling. For example, If we later decided to change our UI components to a webpage instead of a command-line interface, layering would support this.
Layering is achieved by ensuring there are no cross-communication calls from one layer to another.
For example, a UI component should never communicate directly with a service. This would expose the service implementation to the UI and make it difficult for us to change it out later.